-- Decompiled with the Synapse X Luau decompiler.

local ClientOHOH = _G.ClientOHOH;
local M = ClientOHOH.class.new(script);
local JsonHelper = ClientOHOH.load.JsonHelper();
local RemoteEvent = ClientOHOH:GetPath_Loop("ReplicatedStorage.RemoteEvent", game);
local p11 = game:GetService("RunService")
local p12 = _G.CommonOHOH

local function u8(v1, v2,v3,...)
	if not v2 then
		v2={}
	end
	if not v1 then
		return
	end
	if not v1.GetChildren then
		return
	end

	for _, v in pairs(v1:GetChildren()) do
		if v:isA("ModuleScript") then
			local p1=require(v)
			if p1.OnInit then
				table.insert(v2,p1.OnInit())
			end
		end
	end
	if v3 then
		v3(v2)
	end
end
local function u1(v2,...)
	if not p11:IsStudio() then
		local v5=nil
		local v3 = pcall(function()
			v5=p12.LoadAsset(v2)
		end);
		if not v3 then
			return
		end
		u8(v5,...)
	end
end

local function number2string(p1)
	if type(p1) ~= "table" then
		return p1;
	end;
	local v5 = {};
	for v6, v7 in pairs(p1) do
		if type(v6) == "number" then
			v6 = tostring(v6);
		end;
		v5[v6] = number2string(v7);
	end;
	return v5;
end;
local function string2number(p2)
	if type(p2) ~= "table" then
		return p2;
	end;
	local v8 = {};
	for v9, v10 in pairs(p2) do
		--v8[tonumber(v9) and local v11] = string2number(v10);
		v8[tonumber(v9) or v9] = string2number(v10);

	end;
	return v8;
end;
local HandleManager = {};

local InstanceManager = ClientOHOH.load.InstanceManager();

local l__LocalPlayer__8 = game:GetService("Players").LocalPlayer;
local function u9(p3, p4, ...)
	if HandleManager[p4] then
		local v12 = {};
		for v13, v14 in ipairs({ ... }) do
			v12[v13] = string2number(v14);
		end;
		for v15, v16 in pairs(HandleManager[p4]) do
			v15(p3, table.unpack(v12));
		end;
	end;
end;
RemoteEvent.OnClientEvent:Connect(function(p5, ...)
	local v17 = InstanceManager:FindObject(l__LocalPlayer__8);
	if v17 then
		u9(v17, p5, ...);
		return;
	end;
	ClientOHOH[p5] = ClientOHOH[p5] or {};
	table.insert(ClientOHOH[p5], { ... });
end);
function M.RegistHandle(p6, p7, p8)
	--print("RegistHandle-->",p7)
	HandleManager[p7] = HandleManager[p7] or {};
	HandleManager[p7][p8] = true;
end;
function M.CancelHandle(p9, p10, p11)
	if HandleManager[p10] then
		HandleManager[p10] = nil;
	end;
end;
local l__player_dataex_helper__10 = ClientOHOH.player_dataex_helper;
function M.Fire(p12, p13, ...)
	local v18 = os.clock();
	({})[1] = ...;
	local v19 = {};
	for M0, M1 in ipairs({ ... }) do
		v19[M0] = number2string(M1);
	end;
	RemoteEvent:FireServer(l__player_dataex_helper__10:Encode(p13, v19), table.unpack(v19));
end;
local u11 = {};
function M.DelayGet(p14, p15)
	for M2, M3 in ipairs(u11) do
		u9(p15, table.unpack(M3));
	end;
end;
return M;
